package class10;

/**
 * 遍历矩阵
 */
public class Code03_Matrix {
    public static void main(String[] args) {
        int[][] matrix = new int[][]{
                {1, 2, 3, 0},
                {4, 5, 6, 0},
                {7, 8, 9, 0}
        };
        int row = matrix.length;
        int col = matrix[0].length;
        for (int i = 0; i < row; i++) {
            for (int j = 0; j < col; j++) {
                System.out.print(matrix[i][j]+"\t");
            }
            System.out.println();
        }


    }
}
